﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Questions.aspx.vb" Inherits="Prototype.Questions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="SqlDataSource1">
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
            ReadOnly="True" SortExpression="ID" />
        <asp:BoundField DataField="Traveller" HeaderText="Traveller" 
            SortExpression="Traveller" />
        <asp:BoundField DataField="Question" HeaderText="Question" 
            SortExpression="Question" />
        <asp:BoundField DataField="askedDate" HeaderText="askedDate" 
            SortExpression="askedDate" />
        <asp:HyperLinkField DataNavigateUrlFields="ID" 
            DataNavigateUrlFormatString="QuestionAnswers.aspx?ID={0}" HeaderText="Answers" 
            Text="Answer" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:booksConn %>" 
    ProviderName="<%$ ConnectionStrings:booksConn.ProviderName %>" 
    SelectCommand="SELECT * FROM [Questions]"></asp:SqlDataSource>
<br />
<br />
<br />
Ask a new Question<br />
<br />
<asp:TextBox ID="Tb_quest" runat="server" TextMode="MultiLine"></asp:TextBox>
<br />
<br />
<asp:Button ID="Btn_quest" runat="server" Text="Submit Question" />
</asp:Content>
